﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GeneralAdaptiveFramework
{
    public abstract class ActiveComponent : Component
    {
        public ActiveComponent(string _name)
            : base(_name)
        {

        }
        /**
         * Get command and send the command to the passive components
         */
        public void execute(Object data)
        {
            foreach (Interface i in interfaceList)
                if (i is ProvideInterface)
                    transferData(data, i.name);
        }

        /**
         * Receive data
         */
        public override abstract void receiveData(Object data);
        public override abstract void execute();
        public abstract void stop();
    }
}
